let container;
window.onload = function() {
	container = document.getElementById("location");
}

function getLocation() {
	if (navigator.geolocation) {
		navigator.geolocation.getCurrentPosition(showPostion);
	} else {
		container.innerHTML = "不支持";
	}
}

function showPostion(position) {
	container.innerHTML = "Lat:" + position.coords.latitude +
		"<br/>Long:" + position.coords.longitude;
}

